home *** CD-ROM | disk | FTP | other *** search
- 128
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- XCopy
- --- RECORDSEPARATOR ---
- Platform:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Windows and Macintosh
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Description:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- baXCopy copies multiple files from one folder to another folder, with wildcard
- --- RECORDSEPARATOR ---
- matching, including sub-directories.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Usage:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Result = baXCopy( SourceDir, DestDir, FileSpec, Overwrite, MakeDir )
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Arguments:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- String, string, string, string, integer.
- --- RECORDSEPARATOR ---
- SourceDir is the folder to copy from.
- --- RECORDSEPARATOR ---
- DestDir is the folder to copy to.
- --- RECORDSEPARATOR ---
- FileSpec determines what files are copied.
- --- RECORDSEPARATOR ---
- Overwrite determines how the copy is done. Can be:
- --- RECORDSEPARATOR ---
- "Always"
- --- RECORDSEPARATOR ---
- always copies the file
- --- RECORDSEPARATOR ---
- "IfNewer"
- --- RECORDSEPARATOR ---
- copies the file if SourceFile is newer than DestFile
- --- RECORDSEPARATOR ---
- "IfNotExist"
- --- RECORDSEPARATOR ---
- copies only if DestFile does not already exist
- --- RECORDSEPARATOR ---
- If MakeDir is true, any empty directories will be created.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Returns:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Integer.
- --- RECORDSEPARATOR ---
- Returns 0 if all the files were copied successfully, otherwise one of these:
- --- RECORDSEPARATOR ---
- 1
- --- RECORDSEPARATOR ---
- Invalid SourceDir name
- --- RECORDSEPARATOR ---
- 2
- --- RECORDSEPARATOR ---
- Invalid DestDir file name
- --- RECORDSEPARATOR ---
- 3
- --- RECORDSEPARATOR ---
- Error reading a Source file
- --- RECORDSEPARATOR ---
- 4
- --- RECORDSEPARATOR ---
- Error writing a Dest file
- --- RECORDSEPARATOR ---
- 5
- --- RECORDSEPARATOR ---
- Couldn't create directory for Dest files
- --- RECORDSEPARATOR ---
- 6
- --- RECORDSEPARATOR ---
- Dest file exists
- --- RECORDSEPARATOR ---
- 7
- --- RECORDSEPARATOR ---
- Dest file is newer that Source file
- --- RECORDSEPARATOR ---
- 8
- --- RECORDSEPARATOR ---
- No files matched the specified wildcard
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Examples:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Director:
- --- RECORDSEPARATOR ---
- set OK = baXCopy( "c:\data" , "d:\backup" , "*.dat" , "IfNewer" , true )
- --- RECORDSEPARATOR ---
- set OK = baXCopy( "Mac HD:data" , "Floppy:backup" , "TEXT" , "IfNewer" , true )
- --- RECORDSEPARATOR ---
- Authorware:
- --- RECORDSEPARATOR ---
- OK := baXCopy( "c:\\data" , "d:\\backup" , "*.*" , "Always" , f
- --- RECORDSEPARATOR ---
- alse )
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- Notes:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- By default, this function will not overwrite an existing file if that file is marked as
- --- RECORDSEPARATOR ---
- read-only. However, by adding "+" to the "Always" and "IfNewer" options (eg
- --- RECORDSEPARATOR ---
- "Always+" or "IfNewer+"), the files will be overwritten if they are read-only.
- --- RECORDSEPARATOR ---
- The return value will not be 0 if any file is not copied. For example, if you specify
- --- RECORDSEPARATOR ---
- baXCopy( "c:\data" , "d:\backup" , "*.*" , "IfNewer" ) and any of the files in c:\data
- --- RECORDSEPARATOR ---
- are newer than the ones in d:\backup, the return result will be 7 (Dest file is newer
- --- RECORDSEPARATOR ---
- than Source). A result of 0 will be returned only if none of the files in c:\data is
- --- RECORDSEPARATOR ---
- newer than d:\backup.
- --- RECORDSEPARATOR ---
- On
- --- RECORDSEPARATOR ---
- Windows
- --- RECORDSEPARATOR ---
- , the FileSpec argument follows normal DOS wildcard rules. A *
- --- RECORDSEPARATOR ---
- means match any character in the file name. So *.* copies all files; *.bmp copies all
- --- RECORDSEPARATOR ---
- files with a .bmp extension; T*.* copies all files starting with the letter T.
- --- RECORDSEPARATOR ---
- On
- --- RECORDSEPARATOR ---
- Macintosh
- --- RECORDSEPARATOR ---
- , the wildcard is the four character type code, eg ΓÇ£TEXTΓÇ¥. Only one
- --- RECORDSEPARATOR ---
- type can be specified. Use an empty string or ΓÇ£*.*ΓÇ¥ to specify all files.
- --- RECORDSEPARATOR ---
- A return value of 6 (Dest file exists) can only be returned when Overwrite is
- --- RECORDSEPARATOR ---
- "IfNotExist". A return value of 7 (Dest file is newer than Source file) can only be
- --- RECORDSEPARATOR ---
- returned when Overwrite is "IfNewer". The other return values can be returned for
- --- RECORDSEPARATOR ---
- all Overwrite options.
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- See also:
- --- RECORDSEPARATOR ---
-
- --- RECORDSEPARATOR ---
- baCopyFile
- --- RECORDSEPARATOR ---
- baCopyXFiles